package com.admin.smoke;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

public class AdminTestSuite extends BaseTest {
	
	String username = "admin@Yourstore.com";
	String password = "Admin";
	String consumerUsername = "NewUser";
	String consumerPassword = "Password12";
	@Before
	public void beforeAdmin()
	{
		driver.get("http://localhost:50267/Admin");
		driver.get("admin-demo.nopecommerce.com");
	}
	
	@Test
	public void verifyAdminCanAddConsumer()
	{
		AdminLoginPage adminLoginPage  = new AdminLoginPage();
		adminLoginPage.login(username,password);
		
		DashBoardPage dashBoardPage = new DashBoardPage();
		dashBoardPage.gotoConsumerPage();
		
		ConsumerPage consumerPage = new ConsumerPage();
		consumerPage.addConsumer(consumerUsername,consumerPassword);
		
		Assert.assertTrue(consumerPage.isConsumerCreated());
		
	}

}
